package org.grayrabbit.cms.content.exp;

import org.grayrabbit.cms.content.base.BaseMission;
import org.grayrabbit.cms.entity.Content;


/**
 *		XMLExportThread.java
 *		@Author      hasau   
 *		@CreateTime  2012-2-8  上午9:37:13	
 **/
public class XMLExportThread implements Runnable{
	private Content content;
	private String parentName;
	private String key;
	public XMLExportThread(Content content,String parentName,String key){
		this.content = content;
		this.parentName = parentName;
		this.key = key;
	}
	 
	public void run() { 
		BaseMission.updateCurrentNum(1,key);
		boolean f = ContentExport.singleExport(content,parentName);
		if(f)  BaseMission.countDoneNum(key,1);
		BaseMission.updateCurrentNum(-1,key);
		BaseMission.countMissionLeftNum(key);
		BaseMission.countItemTotalNum(key);
	}

}
